/// children : []
/// userCount : null
/// parentName : null
/// leaderName : null
/// officeCode : "66271"
/// officeName : "后勤"
/// tenantName : 1000
/// parentId : 7618
/// branchId : 6627
/// rootId : 7618
/// leaderId : null
/// id : 7619
/// createdBy : "5"
/// createdDate : "2022-02-16 10:03:31"
/// updatedBy : null
/// updatedDate : null

class OfficeListTreeData {
  OfficeListTreeData({
      this.children, 
      this.userCount, 
      this.parentName, 
      this.leaderName, 
      this.officeCode, 
      this.officeName, 
      this.tenantName, 
      this.parentId, 
      this.branchId, 
      this.rootId, 
      this.leaderId, 
      this.id, 
      this.createdBy, 
      this.createdDate, 
      this.updatedBy, 
      this.updatedDate,});

  OfficeListTreeData.fromJson(dynamic json) {
    if (json['children'] != null) {
      children = [];
      json['children'].forEach((v) {
        children?.add(OfficeListTreeData.fromJson(v));
      });
    }
    userCount = json['userCount'];
    parentName = json['parentName'];
    leaderName = json['leaderName'];
    officeCode = json['officeCode'];
    officeName = json['officeName'];
    tenantName = json['tenantName'];
    parentId = json['parentId'];
    branchId = json['branchId'];
    rootId = json['rootId'];
    leaderId = json['leaderId'];
    id = json['id'];
    createdBy = json['createdBy'];
    createdDate = json['createdDate'];
    updatedBy = json['updatedBy'];
    updatedDate = json['updatedDate'];
  }
  List<OfficeListTreeData>? children;
  dynamic userCount;
  dynamic parentName;
  dynamic leaderName;
  String? officeCode;
  String? officeName;
  num? tenantName;
  num? parentId;
  num? branchId;
  num? rootId;
  dynamic leaderId;
  num? id;
  String? createdBy;
  String? createdDate;
  dynamic updatedBy;
  dynamic updatedDate;
OfficeListTreeData copyWith({  List<OfficeListTreeData>? children,
  dynamic userCount,
  dynamic parentName,
  dynamic leaderName,
  String? officeCode,
  String? officeName,
  num? tenantName,
  num? parentId,
  num? branchId,
  num? rootId,
  dynamic leaderId,
  num? id,
  String? createdBy,
  String? createdDate,
  dynamic updatedBy,
  dynamic updatedDate,
}) => OfficeListTreeData(  children: children ?? this.children,
  userCount: userCount ?? this.userCount,
  parentName: parentName ?? this.parentName,
  leaderName: leaderName ?? this.leaderName,
  officeCode: officeCode ?? this.officeCode,
  officeName: officeName ?? this.officeName,
  tenantName: tenantName ?? this.tenantName,
  parentId: parentId ?? this.parentId,
  branchId: branchId ?? this.branchId,
  rootId: rootId ?? this.rootId,
  leaderId: leaderId ?? this.leaderId,
  id: id ?? this.id,
  createdBy: createdBy ?? this.createdBy,
  createdDate: createdDate ?? this.createdDate,
  updatedBy: updatedBy ?? this.updatedBy,
  updatedDate: updatedDate ?? this.updatedDate,
);
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    if (children != null) {
      map['children'] = children?.map((v) => v.toJson()).toList();
    }
    map['userCount'] = userCount;
    map['parentName'] = parentName;
    map['leaderName'] = leaderName;
    map['officeCode'] = officeCode;
    map['officeName'] = officeName;
    map['tenantName'] = tenantName;
    map['parentId'] = parentId;
    map['branchId'] = branchId;
    map['rootId'] = rootId;
    map['leaderId'] = leaderId;
    map['id'] = id;
    map['createdBy'] = createdBy;
    map['createdDate'] = createdDate;
    map['updatedBy'] = updatedBy;
    map['updatedDate'] = updatedDate;
    return map;
  }

}